import Vue from 'vue'
import App from './App'
import store from './store'
import vueUse from '@/util/vueUse.js'
import pullRefreshView from '@/components/app/pull-refresh-view.vue'
import { logger } from '@/util/log'
const dayjs = require('dayjs')
require('dayjs/locale/zh')
const relativeTime = require('dayjs/plugin/relativeTime')
dayjs.extend(relativeTime)
dayjs.locale('zh')
Vue.use(vueUse)

Vue.component('pullRefreshView', pullRefreshView)

Vue.config.productionTip = false
Vue.config.errorHandler = function (err, vm, info) {
  logger.error({
    type: 'errorHandler',
    info,
    err
  })
}
App.mpType = 'app'

const app = new Vue({
  store,
  ...App
})
app.$mount()
